package starcoast.bocai.com.starcoast.fragments;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import butterknife.Bind;
import butterknife.ButterKnife;
import starcoast.bocai.com.starcoast.R;
import starcoast.bocai.com.starcoast.activitys.ForgetPsdActivity;
import starcoast.bocai.com.starcoast.activitys.MainActivity;
import starcoast.bocai.com.starcoast.activitys.ResetPsdActivity;
import starcoast.bocai.com.starcoast.common.BaseFragment;

/**
 * Created by admin on 2016/6/6.
 */
public class LoginPasswordFragment extends BaseFragment implements View.OnClickListener {
    View view;
    @Bind(R.id.tv_forget_psd)
    TextView tv_forget_psd;
    @Bind(R.id.btn_login)
    Button btn_login;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.fragment_login_password, container, false);
        initView();
        return view;
    }
    public void initView(){
        ButterKnife.bind(this, view);
        tv_forget_psd.setOnClickListener(this);
        btn_login.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case  R.id.tv_forget_psd :
                Intent intent = new Intent(getActivity(),ForgetPsdActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_login:
                Intent intent1 = new Intent(getActivity(),MainActivity.class);
                startActivity(intent1);
                break;
        }
    }
}
